package com.revoltingdevelopment.perquackey;

class PerquackeyDie extends Die	
{
/** Produce a perquackey die
 * input: int dicenum 1-13 which dice do you want to throw?
 * getPerquackeyDieLetter() @return char a letter from the dicenum'th Perquackey die
 */
	public static void main(String[] args)	
	{
		PerquackeyDie diediedie = new PerquackeyDie(1);
		System.out.println("Die! Die! Die! : " + diediedie.getPerquackeyDieLetter());
	}

// Normal dice
	private char [] n1 = {'M', 'O', 'C', 'O', 'W', 'P'};
	private char [] n2 = {'E', 'E', 'A', 'A', 'A', 'E'};
	private char [] n3 = {'U', 'N', 'T', 'F', 'P', 'I'};
	private char [] n4 = {'H', 'R', 'F', 'U', 'I', 'S'};
	private char [] n5 = {'Z', 'J', 'Q', 'V', 'E', 'X'};
	private char [] n6 = {'L', 'T', 'N', 'D', 'R', 'O'};
	private char [] n7 = {'W', 'L', 'Y', 'B', 'O', 'O'};
	private char [] n8 = {'E', 'E', 'E', 'A', 'A', 'A'};
	private char [] n9 = {'K', 'R', 'H', 'B', 'I', 'T'};
	private char [] n10 = {'M', 'R', 'I', 'S', 'G', 'U'};

// Vulnerable dice
	private char [] v1 = {'B', 'P', 'N', 'H', 'F', 'L'};
	private char [] v2 = {'K', 'C', 'G', 'M', 'J', 'D'};
	private char [] v3 = {'S', 'V', 'W', 'Y', 'Q', 'S' };
	
	private char[][] allNormal = {n1, n2, n3, n4, n5, n6, n7, n8, n9, n10};
	private char[][] allVulnerable = {v1, v2, v3};
	private char[][] allPerquackeyDie = {n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, v1, v2, v3};

// The character
	private char thePerquackeyLetter;
	
/** Produce a single Perquackey die
 *	@input int dicenum 1-13 which dice do you want to throw?
 */
	public PerquackeyDie(int dicenum)	{
		Die theDie = new Die();
	// dicenum is 1-13; array subscripts are 0-12
		dicenum--;
		char thePerquackeyLetter = allPerquackeyDie[dicenum][theDie.getValue()-1];
		setValue(thePerquackeyLetter);
	}
	private void setValue(char theChar)	{
		this.thePerquackeyLetter = theChar;
	}
	public char getPerquackeyDieLetter()	{
		return this.thePerquackeyLetter;
	}
}
